package utils;

import java.util.Collection;

public class ValidateUtil {
	
	public static boolean isValid(String src) {
		if(src == null || "".equals(src.trim())) {
			return false;
		}
		return true;
	}
	
	public static boolean isValids(String src) {
		if(src == null || "".equals(src.trim()) || src.equals("null")) {
			return false;
		}
		return true;
	}
	
	@SuppressWarnings("rawtypes")
	public static boolean isValid(Collection col) {
		if(col == null || col.isEmpty()) {			
			return false;
		}
		return true;
	}
	
	public static boolean isValid(Object[] arr) {
		if(arr == null || arr.length == 0) {
			return false;
		}
		return true;
	}
	
	public static boolean isValid(Float num) {
		if(num == null || num == 0) {
			return false;
		}
		return true;
	}
	
	public static boolean isValid(Double num) {
		if(num == null || num == 0) {
			return false;
		}
		return true;
	}
	
	public static boolean isValid(Integer num) {
		if(num == null || num == 0) {
			return false;
		}
		return true;
	}
	
	public static boolean isValid(Long num) {
		if(num == null || num == 0) {
			return false;
		}
		return true;
	}
	
}